package com.crazy.crazyuserservice.service;

import com.baomidou.mybatisplus.extension.service.IService;
import com.crazy.crazymodel.model.dto.admin.AddAccountRequest;
import com.crazy.crazymodel.model.dto.admin.ReChargeRequest;
import com.crazy.crazymodel.model.dto.admin.UpdateCustomerInfoRequest;
import com.crazy.crazymodel.model.entity.Customer;
import com.crazy.crazymodel.model.vo.*;
import org.springframework.web.bind.annotation.RequestBody;

import java.math.BigDecimal;
import java.util.ArrayList;

public interface ClientService extends IService<Customer> {

    /**
     * 新增用户
     *
     * @param addAccountRequest
     * @return
     */
    AddCustomerVO save(AddAccountRequest addAccountRequest);

    /**
     * 模拟充值
     * @param reChargeRequest
     */
    BigDecimal recharge(ReChargeRequest reChargeRequest);

    /**
     * 查询账户余额
     * @param bankcard
     * @return
     */
    GetMoneyVO getMoney(String bankcard);

    /**
     * 获取客户信息列表
     * @param current
     * @param name
     * @return
     */
    AllCustomerVO pageQuery(Integer current, String name);

    /**
     * 获取全部客户列表
     * @return
     */
    AllCustomerVO getAllCustomer();

    /**
     * 修改客户信息
     * @param updateCustomerInfoRequest
     */
    boolean update(UpdateCustomerInfoRequest updateCustomerInfoRequest);

    /**
     * 删除客户
     * @param id
     */
    boolean deleteAccount(Integer id);

    /**
     * 删除客户银行卡
     * @param bankcard
     */
    boolean deleteBankCard(String bankcard);

    /**
     * 查看客户银行卡是否能删除
     * @param bankcards
     */
    DelCardsVO checkCarddel(ArrayList<String> bankcards);

    /**
     * 根据客户姓名查找客户
     * @param name
     * @return
     */
    Customer getByNameAndIdNumber(String name,String idNumber);
}
